<extend name='Public/_Main' />
<block name='right'>
<div class='table-responsive'>
 <table class="table table-hover">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>模型名</th>
                            <th>表名</th>
                            <th>创建时间</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <volist name='list' id='list'>
                        <tr>
                            <td>
                                {$list.id}
                            </td>
                            <td>
                                {$list.name}
                            </td>
                            <td>
                                {$list.model}
                            </td>
                            <td title='{$list.create_time}'>
                                {$list.time|friendlyDate}
                            </td>
                            <td>
                                <div role="group" class="btn-group">

                                    <a href="{:U('rom',array('id'=>$list['id']))}" class="btn btn-default">修改</a>
                                     <a href="{:U('field',array('id'=>$list['id']))}" class="btn btn-default">字段管理</a>
                                    <if condition="$list['static']">
                                    <a href="#" class="btn btn-danger" disabled='disabled' title='默认不可删除'>删除</a>
                                    <else/>
                                    <a href="{:U('del',array('id'=>$list['id']))}" class="btn btn-danger getajax" >删除</a>
                                    </if>
                                    </div>
                            </td>
                        </tr>
                    </volist>
                </table>
                </div>
    <!-- Modal -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">新增模型</h4>
                </div>
                <div class="modal-body">
                    <form class="require" action="{:U('add')}" method="post">
                        <div class="form-group">
                            <label for="exampleInputEmail1">模型名称<span class="Validform_checktip"></span></label>
                            <input type="text" class="form-control" placeholder="例：询盘管理" datatype='*' name="name" ajaxurl="{:U('add',array('model'=>'1'))}">
                        </div>
                       
                       
                        <div class='col-xs-6'>
                            <button class="btn btn-lg btn-primary btn-block" type="submit">保存</button>
                        </div>
                        <div class='col-xs-6'>
                            <button class="btn btn-lg btn-default btn-block" type="button"  data-dismiss="modal">关闭</button>
                        </div>
                    </form>
                    <br/>
                    <br/>
                    <br/>
                </div>
            </div>
        </div>
    </div>
    <!--end Modal-->
</block>
